According to a conventional image coding method represented by ITU-T standards referred to as H.26x and ISO/IEC standards referred to as MPEG-x, an image coding apparatus partitions a picture into predetermined units, and performs coding on a per-unit basis. For example, according to H.264/MPEG-4 AVC scheme (for example, see Non Patent Literature (NPTL) 1), an image coding apparatus processes a picture per unit referred to as a macroblock including horizontal 16 pixels and vertical 16 pixels.
For motion compensation, the image coding apparatus partitions a macroblock into blocks (the minimum block size is horizontal 4 pixels×vertical 4 pixels). Subsequently, the image coding apparatus performs motion compensation using different motion vectors for respective blocks, and performs frequency transform on a differential signal between a signal resulting from the motion compensation and an original signal to concentrate the differential signal to the low frequency region. Furthermore, the image coding apparatus is capable of compressing information by quantizing a signal resulting from frequency transform. According to a method of coding a picture on a per-block basis using orthogonal transform, such as discrete cosine transform (DCT), in which differential signals are concentrated to the low frequency region, it is known that grid pattern distortion referred to as blocking artifacts occur at block boundaries.
In High Efficiency Video Coding (HEVC) scheme (for example, see NPL 2) that has been studied as a new standard, motion compensation and orthogonal transform may be performed in a unit varying from a large block (horizontal 64 pixels×vertical 64 pixels) to 4×4 pixels. It is known that this scheme may involve complex blocking artifacts. Furthermore, in the HEVC scheme, to further reduce coding degradation (difference between (i) an original before coding and (ii) a coded and decoded signal, processing for reducing coding degradation referred to as sample adaptive offset (SAO) has been studied. SAO is offset processing performed to reduce coding degradation. In SAO, offset values are added to signals in each predetermined region or subregion.